

<?php if($location_parent){?>
<div class="widget">
    <div class="widgetTitle">
        <h3>Browse All Location </h3>
   </div>
    <!-- /.widgetTitle -->
    <div class="widgetContent">
        <ul class="list">
            <?php foreach($location_parent as $location_parent):?>
            
            <?php 
            $location = Locations::parent($location_parent->id)->get(array('id','name','slug'));
            ?>
           		<?php if($location == TRUE){?>	 
                <li class="col-sm-4 col-xs-6">+ <a href="<?= URL::base();?>/location/all/<?= $location_parent->slug;?>"><?= $location_parent->name;?></a></li>
           		<?php }?>
           		<?php if($location == FALSE){?>
           		<li class="col-sm-4 col-xs-6">+ <a href="<?= URL::base();?>/<?= $location_parent->slug;?>"><?= $location_parent->name;?></a></li>
           		<?php }?>
           		
            <?php endforeach;?>
        </ul>
    </div>
    <!-- /.widgetContent -->
</div>
<!-- /.widget -->
<?php }?>
